
#include <stm32f10x.h>

unsigned int __IO g_uiTimingDelay = 0;
unsigned int __IO g_uiGprsTimingDelay = 0;
unsigned int __IO g_uiXcTimingDelay = 0;

void set_func_timing_delay(unsigned int uiDelay)
{
  g_uiTimingDelay = uiDelay;
}

unsigned int get_func_timing_delay(void)
{
  return g_uiTimingDelay;
}

void func_timing_delay(unsigned int uiTime)
{ 
  set_func_timing_delay(uiTime);
  while(get_func_timing_delay() != 0);
}

void set_gprs_timing_delay(unsigned int uiDelay)
{
  g_uiGprsTimingDelay = uiDelay;
}

unsigned int get_gprs_timing_delay(void)
{
  return g_uiGprsTimingDelay;
}

void gprs_systick_delay(unsigned int uiTime)
{ 
  set_gprs_timing_delay(uiTime);
  while(get_gprs_timing_delay() != 0);
}

void set_xc_timing_delay(unsigned int uiDelay)
{
  g_uiXcTimingDelay = uiDelay;
}

unsigned int get_xc_timing_delay(void)
{
  return g_uiXcTimingDelay;
}

void xc_delay(unsigned int uiTime)
{ 
  set_xc_timing_delay(uiTime);
  while(get_xc_timing_delay() != 0);
}


